/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2025-06-29 21:50:59
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2025-06-29 22:23:49
 * @FilePath: /book-manage-react/src/redux/global.store.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createSlice } from '@reduxjs/toolkit'

export const globalSlice = createSlice({
  name: 'counter',
  initialState: {
    value: 0
  },
  reducers: {
    increment: (state) => {
      debugger
      state.value += 1
    },
    decrement: (state) => {
      state.value -= 1
    }
  }
})

export const { increment, decrement } = globalSlice.actions

export default globalSlice.reducer
